﻿using System.ComponentModel.DataAnnotations;

namespace Application.DTO
{
    public class PermissionFormRequest
    {
        [Required]
        public string Title { get; set; }
        /// <summary>
        /// 路由
        /// </summary>
        public string Path { get; set; } = "";
        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// icon
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; set; }
        public int ParentId { get; set; }
        public int Level { get; set; }
        public int Id { get; set; }
        public MenuType Type { get; set; }
        public bool isEnable { get; set; }
        public string Component { get; set; }
    }

    #region vue路由
    public class PermissionInfo
    {
        public int Id { get; set; }
        public int ParentId { get; set; }
        public string Path { get; set; }
        public string Component { get; set; }
        public string Redirect { get; set; }
        public string Name { get; set; }
        public MenuType Type { get; set; }

        public Meta Meta { get; set; }
        public List<PermissionInfo> Children { get; set; }
    }
    public class Meta
    {
        public string Title { get; set; }
        public string icon { get; set; }
        public int Id { get; set; }//额外附加主键
    }
    #endregion
}
